`:top
In `F33f`_`[computing`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computing]`_`f, a `F33f`_`[process`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Process_(computing)]`_`f that is `!blocked`! is waiting for some `F33f`_`[event`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Event_(computing)]`_`f, such as a `F33f`_`[resource`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Resource_(computer_science)]`_`f becoming available or the completion of an `F33f`_`[I/O operation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=I/O_operation]`_`f.`:cite-ref-1[`F5bf`_`[1`#cite-note-1]`_`f] Once the event occurs for which the process is waiting ("is blocked on"), the process is advanced from `F33f`_`[blocked`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Process_state]`_`f `F33f`_`[state`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Process_state]`_`f to an imminent one, such as `F33f`_`[runnable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Process_state]`_`f.
In a `F33f`_`[multitasking`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computer_multitasking]`_`f computer system, individual `F33f`_`[tasks`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Task_(computing)]`_`f, or `F33f`_`[threads of execution`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Thread_of_execution]`_`f, must share the resources of the system. `F33f`_`[Shared resources`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Shared_resource]`_`f include: the CPU, network and network interfaces, memory and disk.
When one task is using a resource, it is generally not possible, or desirable, for another task to access it. The techniques of `F33f`_`[mutual exclusion`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Mutual_exclusion]`_`f are used to prevent this concurrent use. When the other task is blocked, it is unable to execute until the first task has finished using the shared resource.
`F33f`_`[Programming languages`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Programming_language]`_`f and `F33f`_`[scheduling algorithms`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Scheduling_algorithm]`_`f are designed to minimize the over-all effect of blocking. A process that blocks may prevent local work-tasks from progressing. In this case "blocking" often is seen as not wanted.`:cite-ref-2[`F5bf`_`[2`#cite-note-2]`_`f] However, such work-tasks may instead have been assigned to independent processes, where halting one has little to no effect on the others, since scheduling will continue. An example is "blocking on a `F33f`_`[channel`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Channel_(programming)]`_`f" where passively waiting for the other part (i.e. no `F33f`_`[polling`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Polling_(computer_science)]`_`f or `F33f`_`[spin loop`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Busy_waiting]`_`f) is part of the semantics of channels.`:cite-ref-3[`F5bf`_`[3`#cite-note-3]`_`f] Correctly engineered, any of these may be used to implement reactive systems.
`F33f`_`[Deadlock`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Deadlock_(computer_science)]`_`f means that processes pathologically wait for each other in a circle. As such it is not directly associated with blocking.
>>Contents
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f
-─
>>See also
• `F33f`_`[Concurrent computing`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Concurrent_computing]`_`f
• `F33f`_`[Data dependency`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Data_dependency]`_`f
• `F33f`_`[Non-blocking algorithm`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Non-blocking_algorithm]`_`f
• `F33f`_`[Race condition`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Race_condition]`_`f
• `F33f`_`[Scheduling (computing)`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Scheduling_(computing)]`_`f
>>References
`:cite-note-1`!1.`! `F0af`_`[↑`#cite-ref-1]`_`f `:citerefstallings2004`aStallings, William (2004). `*Operating Systems: Internals and Design Principles`* (5th ed.). Prentice Hall. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 978-0131479548.
`:cite-note-2`!2.`! `F0af`_`[↑`#cite-ref-2]`_`f C++ and Beyond 2012: Herb Sutter - C++ Concurrency
`:cite-note-3`!3.`! `F0af`_`[↑`#cite-ref-3]`_`f `F33f`_`[Rob Pike`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Rob_Pike]`_`f (2012-07-02). `*Go Concurrency Patterns`*. `F33f`_`[Google I/O`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Google_I/O]`_`f 2012. Google for Developers.
`c`F0af`_`[↑ Back to top`#top]`_`f`a